from bcc import BPF

# eBPF程序代码
ebpf_prog = """
int kprobe__sys_sync(void* ctx) {
    bpf_trace_printk("sys_sync() called\\n");
    return 0;
}
"""


def main():
    print("Tracing sys_sync()... Ctrl-C to end.")

    # 创建一个BPF对象
    bpf = BPF(text=ebpf_prog)

    # 打印追踪输出
    bpf.trace_print()


if __name__ == "__main__":
    main()


